package by.ostrovsky.webhousingsystem.dao;

import java.util.List;

import by.ostrovsky.webhousingsystem.dao.implementation.WizardTransactor;
import by.ostrovsky.webhousingsystem.dao.implementation.idao.*;
import by.ostrovsky.webhousingsystem.hibernate.entity.Account;
import by.ostrovsky.webhousingsystem.hibernate.entity.Employee;
import by.ostrovsky.webhousingsystem.hibernate.entity.ProvidedWork;
import by.ostrovsky.webhousingsystem.hibernate.entity.TaskGroup;
import by.ostrovsky.webhousingsystem.hibernate.entity.UserRequest;
import by.ostrovsky.webhousingsystem.hibernate.entity.WorkPlan;

public abstract class DAOFactory {
	public final static int MySQL = 0;

	public abstract IOperateDAO<List<Account>, Boolean> getAccountDAO();
	public abstract IOperateDAO<List<UserRequest>, Boolean> getHousingRequestDAO();
	public abstract IOperateDAO<List<TaskGroup>, Boolean> getTaskGroupDAO();
	public abstract IOperateDAO<List<WorkPlan>, Boolean> getWorkPlanDAO();
	public abstract IOperateDAO<List<Employee>, Boolean> getEmployeDAO();
	public abstract IOperateDAO<List<ProvidedWork>, Boolean> getProvidedWorkDAO();
	
	public abstract IReadDAO<Account> getReadAccountDAO();
	public abstract IReadDAO<Employee> getReadEmployeDAO();
	public abstract IReadDAO<UserRequest> getReadHousingRequestDAO();
	public abstract IReadDAO<TaskGroup> getReadTaskGroupDAO();
	public abstract IReadDAO<WorkPlan> getReadWorkPlanDAO();
	public abstract IReadDAO<ProvidedWork> getReadProvidedWorkDAO();
	
	public abstract IWizardDAO<Employee> getEmployeeWizardDAO(WizardTransactor transactor);
	public abstract IWizardDAO<UserRequest> getHousingRequestWizardDAO(WizardTransactor transactor);
	public abstract IWizardDAO<WorkPlan> getWorkPlanWizardDAO(WizardTransactor transactor);
	public abstract IWizardDAO<TaskGroup> getTaskGroupWizardDAO(WizardTransactor transactor);

	public static DAOFactory getDAOFactory(int dbType) {
		switch (dbType) {
		case MySQL:
			return new MySQLDAOFactory();
		default:
			return null;
		}
	}
}
